
<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <div class="panel-lead"><em>发票配置</em></div>
        {:build_heading(null,FALSE)}
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                        <input id="c-key" type="hidden" data-rule="required"  class="form-control" name="row[key]" value="{$key}" readonly/>
                        <div class="row">

                            
                           

                            <div class="col-md-12 col-xs-12 form-group">
                                <label for="c-status" class="control-label col-xs-12 col-sm-2">{:__('启用')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    {:build_radios('row[status]', ['1'=>__('开启'), '0'=>__('关闭')], isset($row['status'])?$row['status']:0)}
									<span class="help-block">启用才能使用</span>
                                </div>
                            </div>
                           
                            
                            <div class="col-md-12 col-xs-12 form-group">
                                <label for="c-invoice_body" class="control-label col-xs-12 col-sm-2">{:__('开票主体')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-invoice_body" class="form-control" name="row[values][invoice_body]"  type="text" value="{:isset($row['values']['invoice_body'])?$row['values']['invoice_body']:''}">
                                    <span class="help-block"></span>
                                </div>
                            </div>
							<div class="col-md-12 col-xs-12 form-group">
                                <label for="c-tax_rate1" class="control-label col-xs-12 col-sm-2">{:__('增值税普票税率')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-tax_rate1" class="form-control" name="row[values][tax_rate1]"  type="number" value="{:isset($row['values']['tax_rate1'])?$row['values']['tax_rate1']:6}">
                                    <span class="help-block">不用输入%号</span>
                                </div>
                            </div>

                            <div class="col-md-12 col-xs-12 form-group">
                                <label for="c-tax_rate2" class="control-label col-xs-12 col-sm-2">{:__('增值税专票税率')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-tax_rate2" class="form-control" name="row[values][tax_rate2]"  type="number" value="{:isset($row['values']['tax_rate2'])?$row['values']['tax_rate2']:17}">
                                    <span class="help-block">不用输入%号</span>
                                </div>
                            </div>



                            <div class="col-md-12 col-xs-12 form-group">
                                <label for="c-invoice_admin_ids" class="control-label col-xs-12 col-sm-2">{:__('抄送通知财务')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <input id="c-invoice_admin_ids"  data-source="facrm/common/selectpage/model/admin/type/all" data-multiple="true" data-field="nickname" class="form-control selectpage"
                                           name="row[values][invoice_admin_ids]" type="text" value="{:isset($row['values']['invoice_admin_ids'])?$row['values']['invoice_admin_ids']:''}" placeholder="选择">
                                    <span class="help-block">*开票资料审核通过后，通知财务开具发票。</span>
                                </div>
                            </div>

                            <div class="form-group col-md-12 col-xs-12">
                                <label for="c-emailtpl" class="control-label col-xs-12 col-sm-2">{:__('邮件发送模板')}:</label>
                                <div class="col-xs-12 col-sm-8">
                                    <textarea id="c-emailtpl" data-rule="required" class="form-control editor " name="row[values][emailtpl]" rows="5">{php}echo isset($row['values']['emailtpl'])?$row['values']['emailtpl']:"您的发票已经开具,序号{:id}";{/php}</textarea>
                                    <span class="help-block">*支持插入发票字段，如发票抬头{literal}{:invoice_name}{/literal}。（用于发票开具后发邮件给客户）</span>
                                </div>
                            </div>


                            <div class="form-group layer-footer">
                                <label class="control-label col-xs-12 col-sm-2"></label>
                                <div class="col-xs-12 col-sm-8">
                                    <button type="submit" class="btn btn-success btn-embossed disabled">{:__('submit')}</button>
                                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                </div>
                            </div>
                    </form>



                </div>
            </div>

        </div>
    </div>
</div>

<script>
    require.callback = function () {

        define('backend/facrm/setting/payonline', ['jquery', 'form'], function ($, Form) {
            var Controller = {
                index: function () {
                    Form.api.bindevent($("form[role=form]"));

                }
            };
            return Controller;
        });
    }
</script>




